﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BenefitHelper.Data.ServerData
{
    /// <summary>
    /// 结算历史表
    /// </summary>
    public class T_Settle_History
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 交易日
        /// </summary>
        public string TradingDay { get; set; }
        /// <summary>
        /// 结算编号
        /// </summary>
        public int SettlementId { get; set; }
        /// <summary>
        /// 结算时间
        /// </summary>
        public double DateTime { get; set; }


        /// <summary>
        /// 查询某天最大的结算信息编号
        /// </summary>
        /// <param name="accountid"></param>
        /// <param name="tradingday"></param>
        /// <returns></returns>
        internal int GetDayMaxSettlementInfoId(string tradingday)
        {
            string sql = "select max(SettlementId) from T_Settle_History where TradingDay='" + tradingday + "'";
            object obj = Common.ADO.Tools.OracleHelper.GetSingle(sql);
            int maxSettlementId = -1;
            if (obj != null)
            {
                maxSettlementId = Convert.ToInt32(obj);
            }
            return maxSettlementId;
        }

       
    }
}